home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 8434 / 8434.xpi / chrome / content / commonOverlay.js < prev    next >
Text File  |  2009-11-11  |  1KB  |  31 lines

  1. var googleredesignedCommonOverlay = {
  2. addBlank:function () {
  3.     googleredesignedCommon.add("");
  4. },
  5. clearMenu:function (event) {
  6.     var popup = event.target;
  7.     while (popup.hasChildNodes()) {
  8.         popup.removeChild(popup.firstChild);
  9.     }
  10. },
  11. handleStatusClick:function (event) {
  12.     if (event.target.id == "googleredesigned-panel" || event.target.id == "googleredesigned-panel-prism") {
  13.         if (event.button == 2) {
  14.             event.target.firstChild.showPopup();
  15.         } else if (event.button == 1) {
  16.             googleredesignedCommonOverlay.openManageStyles();
  17.         }
  18.     }
  19. },
  20. openManageStyles:function () {
  21.     var windowName = "googleredesigned";
  22.     var windowsMediator = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
  23.     var win = windowsMediator.getMostRecentWindow(windowName);
  24.     if (win) {
  25.         win.focus();
  26.     } else {
  27.         openDialog("chrome://googleredesigned/content/manage.xul", windowName, "chrome,resizable,dialog=no,centerscreen");
  28.     }
  29. }
  30. }
  31.